<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/index.xhtml">
        <ui:define name="title"/>
        <ui:define name="body">
            <h:form>
                <p:panel id="panel" header="#{bundle.CreateTblRecaudoTitle}" style="margin-bottom:5px;">
                    <h:panelGroup id="messagePanel" layout="block">
                        <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                    </h:panelGroup>

                    <h:panelGrid columns="3" cellpadding="3">
                        <p:outputLabel value="#{bundle.CreateTblRecaudoLabel_actividad}" for="actividad" />
                        <p:selectOneMenu id="actividad" value="#{tblRecaudoController.selected.actividad}" required="true" requiredMessage="#{bundle.CreateTblRecaudoRequiredMessage_actividad}">
                            <h:selectOneMenu title="#{bundle.CreateTblRecaudoTitle_actividad}"/>
                            <f:selectItems value="#{tblActividadController.itemsAvailableSelectOne}"/>
                            <f:validateLength minimum="2" />
                        </p:selectOneMenu>
                        <p:message for="actividad" />

                        <p:outputLabel value="#{bundle.CreateTblRecaudoLabel_excedente}" for="excedente" />
                        <p:inputText id="excedente" value="#{tblRecaudoController.selected.excedente}" title="#{bundle.CreateTblRecaudoTitle_excedente}" />
                        <br/> 

                        <p:outputLabel value="#{bundle.CreateTblRecaudoLabel_cantParticipantes}" for="cantParticipantes" />
                        <p:inputText id="cantParticipantes" value="#{tblRecaudoController.selected.cantParticipantes}" title="#{bundle.CreateTblRecaudoTitle_cantParticipantes}" required="true" requiredMessage="#{bundle.CreateTblRecaudoRequiredMessage_cantParticipantes}">
                            <f:validateLength minimum="2" />
                        </p:inputText>
                        <p:message for="cantParticipantes" />

                        <p:outputLabel value="#{bundle.CreateTblRecaudoLabel_totalGanado}" for="totalGanado" />
                        <p:inputText id="totalGanado" value="#{tblRecaudoController.selected.totalGanado}" title="#{bundle.CreateTblRecaudoTitle_totalGanado}" required="true" requiredMessage="#{bundle.CreateTblRecaudoRequiredMessage_totalGanado}">
                            <f:validateLength minimum="2" />
                        </p:inputText>
                        <p:message for="totalGanado" />

                        <p:outputLabel value="#{bundle.CreateTblRecaudoLabel_gananciaParticipante}" for="gananciaParticipante" />
                        <p:inputText id="gananciaParticipante" value="#{tblRecaudoController.selected.gananciaParticipante}" title="#{bundle.CreateTblRecaudoTitle_gananciaParticipante}" />


                    </h:panelGrid>
                    <br />
                    <p:commandButton action="#{tblRecaudoController.create}" value="#{bundle.CreateTblRecaudoSaveLink}" update="panel" />
                    <p:commandButton action="#{tblRecaudoController.prepareList}" value="#{bundle.CreateTblRecaudoShowAllLink}" immediate="true"/>
                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
